#include "Stack.h"
void print(Stack* ps)
{
	assert(ps);
	for (int i = 0; i < ps->top; i++)
	{
		printf("%d ", ps->a[i]);
	}
	printf("\n");
}

void test()
{
	Stack p;
	StackInit(&p);
	StackPush(&p, 4);
	StackPush(&p, 3);
	StackPush(&p, 2);
	StackPush(&p, 1);
	print(&p);

	printf("%d\n", StackTop(&p));
	printf("%d\n", StackSize(&p));
	printf("%d\n", StackEmpty(&p));


	StackPop(&p);
	StackPop(&p);
	StackPop(&p);
	print(&p);


	StackPop(&p);
	printf("%d\n", StackEmpty(&p));


	StackDestroy(&p);
}

int main()
{
	test();
	return 0;
}